package kyuu.acshmily.events
{
	import flash.events.Event;

	/**
	 * 视频相关的事件
	 */
	public class VideoEvent extends Event
	{
		/**
		 * 缓冲区已经准备好，可以开始播放
		 */
		public static const READY:String = "ready";
		/**
		 * 开始播放 
		 */
		public static const PLAYING:String = "playing";
		/**
		 * 暂停播放
		 */
		public static const PAUSED:String = "paused"
		/**
		 * 所有分段播放完成
		 */
		public static const STOPPED:String = "stopped";
		/**
		 * 播放头更新
		 */
		public static const PLAYHEAD_UPDATE:String = "playheadUpdate";
		/**
		 * 调整播放位置
		 */
		public static const SOUGHT:String = "sought";
		/**
		 * 一个视频分段开始缓冲
		 */
		public static const PART_BUFFERING:String = "partBuffering";
		/**
		 * 一个视频分段缓冲完成
		 */
		public static const PART_COMPLETE:String = "partComplete";
		/**
		 * 一个视频分段开始播放
		 */
		public static const PART_PLAYING:String = "partPlaying";
		/**
		 * 一个视频分段结束播放
		 */
		public static const PART_STOPPED:String = "partStopped";

		// 视频分段
		private var _partIndex:int = 0;
		// 播放头
		private var _playhead:Number = 0.0;

		public function VideoEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, partIndex:int=0, playhead:Number=0.0)
		{
			super(type, bubbles, cancelable);
			_partIndex = partIndex;
			_playhead = playhead;
		}

		public function get partIndex():int{
			return _partIndex;
		}

		public function get playhead():Number{
			return _playhead;
		}
	}
}